package com.mycomponent.activity;

import android.annotation.SuppressLint;
import android.os.Handler;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mycomponent.R;
import butterknife.BindView;
import butterknife.OnClick;
import component.fy.com.common_module.constant.ARouterUtils;
import component.fy.com.common_module.base.BaseActivity;

@Route(path = ARouterUtils.ARouter_App_Main)
public class MainActivity extends BaseActivity {
    private static final String TAG = "MainActivity";

    @BindView(R.id.act_main_btn)
    TextView tvBtn;

    @SuppressLint("HandlerLeak")
    private Handler handler = new Handler(){

    };

    @Override
    protected int getLayoutId() {
        return R.layout.act_main;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initEvents() {

    }

    @Override
    protected void initData() {
        showLoading("");
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                closeLoading();
            }
        }, 1500);
    }

    @OnClick(R.id.act_main_btn)
    void clickBtn() {
        ARouter.getInstance().build(ARouterUtils.ARouter_Content_Main).navigation();
        finish();
    }
}
